<template>
	<view class="class_main_index " @click="goConsultDetail">
		<view class="title u-flex u-flex-items-center u-flex-between">
			<view class="_title u-line-1">
				{{ consult.title }}
			</view>
			<view class="f-s-12 ">
				<text v-if="consult.status == 'Init'" class="u-warning" >待确认</text>
				<text v-if="consult.status == 'Passed'" class="u-primary">已确认</text>
				<text v-if="consult.status == 'Refused'" class="u-info">已取消</text>
			</view>
		</view>
		<view class="u-flex-between u-flex u-m-t-20 u-m-b-6">
			<view class="sub-title ">
				公司名称：{{ consult.companyName }}
			</view>
			<view class="sub-title " v-if="consult.industryName ">
				行业类型：{{ consult.industryName }}
			</view>
		</view>

		<view class="u-flex u-flex-between u-flex-items-center u-m-b-6">
			<view class="sub-title ">
				城市：{{ consult.city }}
			</view>
		</view>
		<view class="u-flex-between u-flex-items-center u-flex  u-m-b-6">
			<view class="sub-title">时间：{{consult.trainAt}}</view>
		</view>
		<up-line margin="6px 0"></up-line>
		<view class="u-flex u-flex-items-center">
			<view class="sub-title ">
				姓名：{{ consult.userName }}
			</view>
			<view class="sub-title u-m-l-40" v-if="consult.job">
				职务：{{ consult.job }}
			</view>
		</view>
	</view>
</template>

<script setup>
	import tag from "@/components/common/tag.vue"
	import teacherIconText from "@/components/common/teacher-icon-text.vue"

	import {
		defineProps
	} from 'vue';

	const props = defineProps({
		consult: Object
	})

	function goConsultDetail() {
		uni.navigateTo({
			url: '/subPackages/order/consult_order_detail?id=' + props.consult.id
		})
	}
</script>

<style lang="scss">
	.class_main_index {
		background-color: #fff;
		border-radius: 6px;
		padding: 12px;

		.title {
			._title {
				font-size: 16px;
				font-weight: bold;
			}
		}

		.sub-title {
			color: #888;
			font-size: 12px;
		}
	}
</style>